//
//  ZNoticeDetaCell.m
//  WeClubs
//
//  Created by 花花 on 2017/6/22.
//  Copyright © 2017年 Zed. All rights reserved.
//

#import "ZNoticeDetaCell.h"

@implementation ZNoticeDetaCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
@end


@implementation ZNoticeDetaHeaderView

- (instancetype)initWithFrame:(CGRect)frame{


    if (self = [super initWithFrame:frame]) {
        
        self.backgroundColor = [UIColor whiteColor];
        
        [self initUI];
        [self initConstraints];
        
    }
    
    return self;

}

- (void)initUI{

    //通知成员
    _noticeLabel = [[UILabel alloc]init];
    _noticeLabel.textColor = NORMAL_COLOR;
    _noticeLabel.text = @"通知成员";
    _noticeLabel.font = [UIFont systemFontOfSize:15];
    [self addSubview:_noticeLabel];
    
    //通知人数（4/7）
    _noticeCountLabel = [[UILabel alloc]init];
    _noticeCountLabel.textColor = NORMAL_COLOR;
    _noticeCountLabel.text = @"(4/7)";
    _noticeCountLabel.font = [UIFont systemFontOfSize:15];
    [self addSubview:_noticeCountLabel];
    
    //分割线
    _lineView = [[UIView alloc]init];
    _lineView.backgroundColor = NORMAL_COLOR;
    [self addSubview:_lineView];
}


- (void)initConstraints{

    Z_WEAK_SELF;
    //通知成员
    [_noticeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.centerY.mas_equalTo(weakSelf.mas_centerY);        
    }];
    //通知人数（4/7）
    [_noticeCountLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-15);
        make.centerY.mas_equalTo(weakSelf.mas_centerY);
    }];

    //分割线
     [_lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        
         make.bottom.mas_equalTo(weakSelf.mas_bottom);
         make.width.mas_equalTo(Z_SCREEN_WIDTH);
         make.height.mas_equalTo(1);
     }];
}



@end

